/* ============================================================================
   Aurelia Luxe — v3.31
   Gallery refinements (layout / shape / spacing / captions / load-more)
   + the rebuilt Blog page, archives and single-post extras.
   Loads last, so it wins over earlier refinement layers.
   ========================================================================= */

/* ═════════════════════════ GALLERY ══════════════════════════════════════ */

/* Filter pills with counts */
.hl-gallery-page .hl-gallery-filter {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.hl-gallery-page .hl-gallery-filter__count {
  font-size: .62rem;
  line-height: 1;
  letter-spacing: .06em;
  padding: .2rem .4rem;
  border-radius: 999px;
  background: rgba(140, 116, 76, .14);
  color: inherit;
}
.hl-gallery-page .hl-gallery-filter.active .hl-gallery-filter__count {
  background: rgba(255, 255, 255, .25);
}

/* Spacing */
.hl-gallery-page .hl-gallery-grid--gap-tight  { gap: .5rem; }
.hl-gallery-page .hl-gallery-grid--gap-normal { gap: 1.15rem; }
.hl-gallery-page .hl-gallery-grid--gap-airy   { gap: 2rem; }

/* Corners */
.hl-gallery-grid--corners-sharp .hl-gallery-item,
.hl-gallery-grid--corners-sharp .hl-gallery-item__inner { border-radius: 0; }
.hl-gallery-grid--corners-soft .hl-gallery-item,
.hl-gallery-grid--corners-soft .hl-gallery-item__inner { border-radius: 6px; }
.hl-gallery-grid--corners-round .hl-gallery-item,
.hl-gallery-grid--corners-round .hl-gallery-item__inner { border-radius: 18px; }

/* Tile shape (uniform + mosaic layouts) */
.hl-gallery-page .hl-gallery-grid:not(.hl-gallery-grid--masonry) .hl-gallery-item__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hl-gallery-page .hl-gallery-grid:not(.hl-gallery-grid--masonry) .hl-gallery-item__inner {
  display: block;
  position: relative;
  overflow: hidden;
}
.hl-gallery-grid--aspect-landscape:not(.hl-gallery-grid--masonry) .hl-gallery-item__inner { aspect-ratio: 4 / 3; }
.hl-gallery-grid--aspect-square:not(.hl-gallery-grid--masonry)    .hl-gallery-item__inner { aspect-ratio: 1 / 1; }
.hl-gallery-grid--aspect-portrait:not(.hl-gallery-grid--masonry)  .hl-gallery-item__inner { aspect-ratio: 3 / 4; }
.hl-gallery-grid--aspect-wide:not(.hl-gallery-grid--masonry)      .hl-gallery-item__inner { aspect-ratio: 16 / 9; }

/* Masonry — CSS columns, natural image heights */
.hl-gallery-page .hl-gallery-grid--masonry {
  display: block;
  column-count: 3;
  column-gap: 1.15rem;
}
.hl-gallery-page .hl-gallery-grid--masonry.hl-gallery-grid--cols-2 { column-count: 2; }
.hl-gallery-page .hl-gallery-grid--masonry.hl-gallery-grid--cols-4 { column-count: 4; }
.hl-gallery-page .hl-gallery-grid--masonry.hl-gallery-grid--gap-tight { column-gap: .5rem; }
.hl-gallery-page .hl-gallery-grid--masonry.hl-gallery-grid--gap-airy  { column-gap: 2rem; }
.hl-gallery-page .hl-gallery-grid--masonry .hl-gallery-item {
  break-inside: avoid;
  margin-bottom: 1.15rem;
  display: block;
}
.hl-gallery-page .hl-gallery-grid--masonry.hl-gallery-grid--gap-tight .hl-gallery-item { margin-bottom: .5rem; }
.hl-gallery-page .hl-gallery-grid--masonry.hl-gallery-grid--gap-airy  .hl-gallery-item { margin-bottom: 2rem; }
.hl-gallery-page .hl-gallery-grid--masonry .hl-gallery-item__img {
  width: 100%;
  height: auto;
  display: block;
}

/* Masonry — landscape variant: every tile is forced into a wide/square
   aspect ratio (never a tall portrait strip), while still staggering
   tile heights column-by-column for that Pinterest feel. */
.hl-gallery-page .hl-gallery-grid--masonry .hl-gallery-item__inner {
  display: block;
  overflow: hidden;
  border-radius: inherit;
}
.hl-gallery-page .hl-gallery-grid--masonry .hl-gallery-item__img {
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3; /* default landscape tile */
}
/* Cycle a handful of landscape/square ratios across the grid so
   columns don't line up into a rigid, same-height grid. */
.hl-gallery-page .hl-gallery-grid--masonry .hl-gallery-item:nth-child(4n+1) .hl-gallery-item__img { aspect-ratio: 4 / 3; }
.hl-gallery-page .hl-gallery-grid--masonry .hl-gallery-item:nth-child(4n+2) .hl-gallery-item__img { aspect-ratio: 1 / 1; }
.hl-gallery-page .hl-gallery-grid--masonry .hl-gallery-item:nth-child(4n+3) .hl-gallery-item__img { aspect-ratio: 16 / 10; }
.hl-gallery-page .hl-gallery-grid--masonry .hl-gallery-item:nth-child(4n+4) .hl-gallery-item__img { aspect-ratio: 3 / 2; }

/* Mosaic — every 7th tile spans two columns and two rows */
.hl-gallery-page .hl-gallery-grid--mosaic { grid-auto-flow: dense; }
@media (min-width: 769px) {
  .hl-gallery-page .hl-gallery-grid--mosaic .hl-gallery-item.is-feature {
    grid-column: span 2;
    grid-row: span 2;
  }
  .hl-gallery-page .hl-gallery-grid--mosaic .hl-gallery-item.is-feature .hl-gallery-item__inner {
    aspect-ratio: auto;
    height: 100%;
  }
}

/* Hover polish */
.hl-gallery-page .hl-gallery-item {
  transition: transform .45s cubic-bezier(.2, .7, .3, 1), box-shadow .45s ease, opacity .3s ease;
}
.hl-gallery-page .hl-gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -22px rgba(36, 28, 22, .55);
}
.hl-gallery-page .hl-gallery-item__overlay {
  background: linear-gradient(to top, rgba(24, 18, 13, .62), rgba(24, 18, 13, 0) 62%);
  opacity: 0;
  transition: opacity .35s ease;
}
.hl-gallery-page .hl-gallery-item:hover .hl-gallery-item__overlay { opacity: 1; }

/* Captions */
.hl-gallery-grid--caption-below .hl-gallery-item__caption {
  display: block;
  margin-top: .6rem;
  font-size: .82rem;
  letter-spacing: .02em;
  color: var(--hl-text-muted, #6b6257);
}
.hl-gallery-grid--caption-none .hl-gallery-item__title,
.hl-gallery-grid--caption-none .hl-gallery-item__caption { display: none; }

/* Load more */
.hl-gallery-item.is-hidden { display: none !important; }
.hl-gallery-more {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

/* Empty state */
.hl-gallery-empty__mark,
.hl-empty-state__mark {
  display: block;
  font-size: 1.5rem;
  color: var(--hl-gold, #b08d57);
  margin-bottom: .75rem;
}

@media (max-width: 1024px) {
  .hl-gallery-page .hl-gallery-grid--masonry { column-count: 2; }
}
@media (max-width: 640px) {
  .hl-gallery-page .hl-gallery-grid--masonry { column-count: 1; }
  .hl-gallery-page .hl-gallery-filter { font-size: .7rem; padding: .45rem .9rem; }
}

/* ═════════════════════════ BLOG ═════════════════════════════════════════ */

.hl-blog-intro__inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.hl-blog-intro__lede {
  margin-top: 1rem;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--hl-text-muted, #6b6257);
}

/* Category filter bar */
.hl-blog-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 2.5rem;
}
.hl-blog-filter {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.25rem;
  border: 1px solid rgba(140, 116, 76, .35);
  border-radius: 999px;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--hl-text, #3d352c);
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.hl-blog-filter:hover {
  border-color: var(--hl-gold, #b08d57);
  color: var(--hl-gold, #b08d57);
}
.hl-blog-filter.active {
  background: var(--hl-gold, #b08d57);
  border-color: var(--hl-gold, #b08d57);
  color: #fff;
}
.hl-blog-filter__count {
  font-size: .62rem;
  line-height: 1;
  padding: .2rem .4rem;
  border-radius: 999px;
  background: rgba(140, 116, 76, .14);
}
.hl-blog-filter.active .hl-blog-filter__count { background: rgba(255, 255, 255, .25); }

/* Grid */
.hl-blog-archive .hl-blog-archive-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.hl-blog-archive-grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.hl-blog-archive-grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }

@media (max-width: 1024px) {
  .hl-blog-archive-grid--cols-2,
  .hl-blog-archive-grid--cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 640px) {
  .hl-blog-archive-grid--cols-2,
  .hl-blog-archive-grid--cols-3 { grid-template-columns: 1fr !important; }
}

/* Card */
.hl-blog-archive .hl-blog-card,
.hl-related-posts .hl-blog-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--hl-light, #fbf7f0);
  border: 1px solid rgba(140, 116, 76, .16);
  border-radius: 10px;
  transition: transform .45s cubic-bezier(.2, .7, .3, 1), box-shadow .45s ease, border-color .3s ease;
}
.hl-blog-archive .hl-blog-card:hover,
.hl-related-posts .hl-blog-card:hover {
  transform: translateY(-5px);
  border-color: rgba(140, 116, 76, .35);
  box-shadow: 0 22px 48px -28px rgba(36, 28, 22, .5);
}
.hl-blog-card__media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 2;
}
.hl-blog-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .7s cubic-bezier(.2, .7, .3, 1);
}
.hl-blog-card:hover .hl-blog-card__img { transform: scale(1.05); }
.hl-blog-card__badge {
  position: absolute;
  top: .85rem;
  left: .85rem;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: rgba(24, 18, 13, .72);
  color: #fff;
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}
.hl-blog-card__body {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  padding: 1.4rem 1.5rem 1.6rem;
  flex: 1;
}
.hl-blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--hl-text-muted, #6b6257);
}
.hl-blog-card__title {
  font-family: var(--hl-font-display, 'Cormorant Garamond', serif);
  font-size: 1.4rem;
  line-height: 1.3;
  margin: 0;
}
.hl-blog-card__title a {
  color: var(--hl-dark, #241c16);
  text-decoration: none;
  background-image: linear-gradient(var(--hl-gold, #b08d57), var(--hl-gold, #b08d57));
  background-size: 0 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .35s ease, color .25s ease;
}
.hl-blog-card__title a:hover {
  color: var(--hl-gold, #b08d57);
  background-size: 100% 1px;
}
.hl-blog-card__excerpt {
  margin: 0;
  font-size: .92rem;
  line-height: 1.75;
  color: var(--hl-text-muted, #6b6257);
}
.hl-blog-card__read {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--hl-gold, #b08d57);
}
.hl-blog-card__read svg { transition: transform .3s ease; }
.hl-blog-card__read:hover svg { transform: translateX(4px); }

/* Featured banner card */
.hl-blog-featured { margin-bottom: 2.25rem; }
.hl-blog-card--featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: stretch;
  background: var(--hl-light, #fbf7f0);
  border: 1px solid rgba(140, 116, 76, .16);
  border-radius: 12px;
  overflow: hidden;
}
.hl-blog-card--featured .hl-blog-card__media { aspect-ratio: auto; height: 100%; min-height: 320px; }
.hl-blog-card--featured .hl-blog-card__body { padding: 2.4rem 2.6rem; justify-content: center; gap: .9rem; }
.hl-blog-card--featured .hl-blog-card__title { font-size: 2.1rem; }
.hl-blog-card--featured .hl-blog-card__excerpt { font-size: 1rem; }
@media (max-width: 900px) {
  .hl-blog-card--featured { grid-template-columns: 1fr; }
  .hl-blog-card--featured .hl-blog-card__media { min-height: 220px; aspect-ratio: 16 / 9; }
  .hl-blog-card--featured .hl-blog-card__body { padding: 1.6rem 1.5rem 1.9rem; }
  .hl-blog-card--featured .hl-blog-card__title { font-size: 1.6rem; }
}

/* Widen the blog archive's container so the Popular Articles section
   fills more of the window and reduces the side whitespace. */
.hl-blog-archive .hl-container { max-width: 1680px; }

/* ── Popular Articles layout (feature card + stacked side list) ─────── */
.hl-blog-popular {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
  align-items: stretch;
}

.hl-blog-popular__feature { display: flex; }
.hl-blog-popular .hl-blog-card--pop-feature,
.hl-blog-popular .hl-blog-card--pop-row {
  border: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.hl-blog-popular .hl-blog-card--pop-feature:hover,
.hl-blog-popular .hl-blog-card--pop-row:hover {
  border: none !important;
  box-shadow: none !important;
}
.hl-blog-card--pop-feature {
  display: flex;
  width: 100%;
  height: 100%;
}
.hl-blog-card--pop-feature .hl-blog-card__media {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border-radius: 32px;
  overflow: hidden;
}
.hl-blog-card--pop-feature .hl-blog-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .7s cubic-bezier(.2, .7, .3, 1);
}
.hl-blog-card--pop-feature:hover .hl-blog-card__img { transform: scale(1.04); }
.hl-blog-card--pop-feature .hl-blog-card__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .8) 100%);
  pointer-events: none;
}
.hl-blog-card--pop-feature .hl-blog-card__overlay-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .85rem;
  padding: 2.4rem 2.4rem 2.2rem;
}
.hl-blog-card--pop-feature .hl-blog-card__title {
  font-size: 1.6rem;
  line-height: 1.28;
  color: #fff;
  margin: 0;
}
.hl-blog-card--pop-feature .hl-blog-card__title a,
.hl-blog-card--pop-feature .hl-blog-card__title { color: #fff; }
.hl-blog-card--pop-feature .hl-blog-card__overlay-excerpt {
  margin: 0;
  font-size: .92rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, .85);
  max-width: 46ch;
}
.hl-blog-card--pop-feature .hl-blog-card__tag {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .4);
  color: #fff;
  backdrop-filter: blur(3px);
}

.hl-blog-popular__list {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.6rem;
}
.hl-blog-popular__list .hl-blog-card--pop-row {
  display: grid !important;
  grid-template-columns: 280px 1fr !important;
  gap: 1.5rem;
  align-items: center;
  flex: 1;
}
.hl-blog-popular__list .hl-blog-card--pop-row .hl-blog-card__media {
  aspect-ratio: 4 / 3 !important;
  width: 280px;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
}
.hl-blog-popular__list .hl-blog-card--pop-row .hl-blog-card__img {
  height: 100%;
}
.hl-blog-card--pop-row .hl-blog-card__body {
  padding: 0 !important;
  gap: .6rem;
  justify-content: center;
}
.hl-blog-card--pop-row .hl-blog-card__title {
  font-size: 1.25rem;
  line-height: 1.32;
}
.hl-blog-card--pop-row .hl-blog-card__excerpt {
  font-size: .9rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Shared pill tag for the popular layout (replaces the on-image badge) */
.hl-blog-card__tag {
  display: inline-flex;
  align-self: flex-start;
  padding: .32rem .8rem;
  border-radius: 999px;
  border: 1px solid rgba(140, 116, 76, .3);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--hl-text-muted, #6b6257);
  background: var(--hl-light, #fbf7f0);
}

@media (max-width: 900px) {
  .hl-blog-popular { grid-template-columns: 1fr; gap: 2rem; }
  .hl-blog-card--pop-feature .hl-blog-card__media { aspect-ratio: 4 / 3; border-radius: 24px; }
  .hl-blog-card--pop-feature .hl-blog-card__overlay-body { padding: 1.6rem 1.6rem 1.7rem; }
  .hl-blog-card--pop-feature .hl-blog-card__title { font-size: 1.4rem; }
  .hl-blog-card--pop-feature .hl-blog-card__overlay-excerpt { display: none; }
}
@media (max-width: 480px) {
  .hl-blog-popular__list .hl-blog-card--pop-row { grid-template-columns: 130px 1fr !important; gap: .8rem; }
  .hl-blog-popular__list .hl-blog-card--pop-row .hl-blog-card__media { width: 130px; }
  .hl-blog-card--pop-row .hl-blog-card__title { font-size: .95rem; }
}

/* Empty state */
.hl-empty-state {
  text-align: center;
  padding: 4rem 1.25rem;
  color: var(--hl-text-muted, #6b6257);
}
.hl-empty-state h3 {
  font-family: var(--hl-font-display, 'Cormorant Garamond', serif);
  font-size: 1.75rem;
  margin: 0 0 .5rem;
  color: var(--hl-dark, #241c16);
}

/* Pagination */
.hl-pagination { margin-top: 3rem; display: flex; justify-content: center; }
.hl-pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.hl-pagination a,
.hl-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0 .6rem;
  border: 1px solid rgba(140, 116, 76, .3);
  border-radius: 999px;
  font-size: .82rem;
  text-decoration: none;
  color: var(--hl-text, #3d352c);
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.hl-pagination a:hover {
  border-color: var(--hl-gold, #b08d57);
  color: var(--hl-gold, #b08d57);
}
.hl-pagination .current {
  background: var(--hl-gold, #b08d57);
  border-color: var(--hl-gold, #b08d57);
  color: #fff;
}

/* Single post extras */
.hl-post-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(140, 116, 76, .2);
}
.hl-post-share__label {
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--hl-text-muted, #6b6257);
  margin-right: .25rem;
}
.hl-post-share__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(140, 116, 76, .3);
  border-radius: 999px;
  color: var(--hl-text, #3d352c);
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}
.hl-post-share__link svg { width: 1.05rem; height: 1.05rem; display: block; }
.hl-post-share__sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.hl-post-share__link:hover,
.hl-post-share__link:focus-visible {
  background: var(--hl-gold, #b08d57);
  border-color: var(--hl-gold, #b08d57);
  color: #fff;
  transform: translateY(-2px);
}
.hl-post-share__copy.is-copied {
  background: var(--hl-gold, #b08d57);
  border-color: var(--hl-gold, #b08d57);
  color: #fff;
}
.hl-post-share__copy.is-copied::after {
  content: "Copied";
  position: absolute;
  bottom: calc(100% + .4rem);
  left: 50%;
  transform: translateX(-50%);
  padding: .2rem .5rem;
  border-radius: 4px;
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--hl-dark, #241c16);
  color: #fff;
  white-space: nowrap;
}

/* Pagination summary + numbers */
.hl-pagination__wrap { margin-top: 3rem; }
.hl-pagination__wrap .hl-pagination { margin-top: 0; }
.hl-pagination-summary {
  margin-top: .9rem;
  text-align: center;
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--hl-text-muted, #6b6257);
}
.hl-pagination .dots { border-color: transparent; }

/* Nudge the blog archive container slightly left instead of dead-center,
   so the Popular Articles section balances better against the page. */
.hl-blog-archive .hl-container {
  transform: translateX(-64px);
}
@media (max-width: 900px) {
  .hl-blog-archive .hl-container { transform: none; }
}

/* Pull the pagination number up closer to the cards above it */
.hl-blog-archive .hl-pagination__wrap { margin-top: .8rem; }

.hl-related-posts { margin-top: 4rem; }
.hl-related-posts__title {
  font-family: var(--hl-font-display, 'Cormorant Garamond', serif);
  font-size: 1.9rem;
  text-align: center;
  margin-bottom: 1.75rem;
  color: var(--hl-dark, #241c16);
}
