/* Asmara Bella — Journal list (blog.html). Cards follow the .xp-related cards on the journal-*.html
   article pages; the in-page article view reuses .xp-article from experience.css.
   The page script sets an inline grid-template-columns on #posts-grid on resize; the layout here
   overrides it so the featured-card grid stays consistent. */

body { background-color: var(--ab-cream); }

/* ---------- Hero ---------- */

.jr-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(90px, 12vw, 160px) 0 clamp(80px, 10vw, 130px);
  text-align: center;
  background: var(--ab-night);
  color: #f0e6d3;
}
.jr-hero-media {
  position: absolute;
  inset: -20% 0;
  background: linear-gradient(180deg, rgba(22, 14, 7, 0.6), rgba(22, 14, 7, 0.86)), url("/assets/images/hero-dining.webp") center 45% / cover;
}
.jr-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18px;
  background: var(--ab-tilet) repeat-x 0 0 / 56px 18px;
}
.jr-hero-copy { position: relative; z-index: 1; }
.jr-hero .xp-eyebrow::after { content: ""; width: 34px; height: 1px; background: currentColor; opacity: 0.7; }
.jr-hero .xp-display { font-size: clamp(42px, 6.4vw, 86px); margin-bottom: 20px; }
.jr-hero-lede { max-width: 600px; margin: 0 auto; font: italic 400 clamp(19px, 2vw, 23px)/1.55 "Playfair Display", serif; color: #f0e6d3; }

/* ---------- Tools ---------- */

.jr-tools {
  position: sticky;
  top: 64px;
  z-index: 20;
  padding: 16px 0;
  background: rgba(255, 248, 243, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #efe2d0;
}
.jr-tools-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.jr-search { position: relative; flex: 1 1 260px; max-width: 360px; }
.jr-search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ab-gold); pointer-events: none; z-index: 1; }
#blog-list-view #search-input {
  width: 100%;
  min-height: 48px !important;
  padding: 12px 18px 12px 44px !important;
  border-radius: 999px !important;
  font-size: 16px !important;
}
.jr-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-pill {
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid #e2d3bb;
  background: #fffdf9;
  color: #5c5142;
  font: 600 14px/1 "Plus Jakarta Sans", sans-serif;
  transition: border-color 0.25s, background-color 0.25s, color 0.25s, transform 0.4s var(--xp-ease);
}
.cat-pill:hover { border-color: var(--ab-gold); color: var(--ab-brown); background: #fff; transform: translateY(-2px); }
.cat-pill.active { background: var(--ab-brown); border-color: var(--ab-brown); color: #fff; box-shadow: 0 10px 22px -12px rgba(117, 90, 26, 0.8); }
.jr-count { margin: 0 0 0 auto; font-size: 14px; color: #6b5f4d; white-space: nowrap; }

/* ---------- Grid & cards ---------- */

.jr-main { padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(40px, 5vw, 64px); }
#posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 24px; }

.blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  background: #fffdf9;
  border: 0;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 24px 50px -34px rgba(33, 27, 18, 0.45);
  transition: transform 0.55s var(--xp-ease), box-shadow 0.55s var(--xp-ease);
  animation: jr-card-in 0.8s var(--xp-ease) both;
}
#posts-grid > :nth-child(2) { animation-delay: 0.06s; }
#posts-grid > :nth-child(3) { animation-delay: 0.12s; }
#posts-grid > :nth-child(4) { animation-delay: 0.18s; }
#posts-grid > :nth-child(5) { animation-delay: 0.24s; }
#posts-grid > :nth-child(n+6) { animation-delay: 0.3s; }
@keyframes jr-card-in { from { opacity: 0; transform: translate3d(0, 26px, 0); } to { opacity: 1; transform: none; } }
.blog-card:hover { transform: translateY(-6px); box-shadow: 0 36px 64px -32px rgba(33, 27, 18, 0.5); }
.blog-card:focus-visible { outline: 3px solid var(--ab-gold); outline-offset: 4px; }

.jr-card-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.jr-card-img .blog-card-img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; display: block; transition: transform 1.2s var(--xp-ease); }
.blog-card:hover .blog-card-img { transform: scale(1.06); }
.blog-card-body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; }

.cat-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  padding: 0;
  border: 0 !important;
  background: none !important;
  color: var(--ab-gold) !important;
  font: 700 11.5px/1 "Plus Jakarta Sans", sans-serif;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.cat-badge::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: 0.7; }
.cat-badge.Food { color: #a5552c !important; }
.cat-badge.Culture { color: #6c4d9d !important; }
.cat-badge.News { color: #1f6e50 !important; }

.jr-card-title { margin: 0 0 10px; font: 600 21px/1.3 "Playfair Display", serif; color: var(--ab-ink); letter-spacing: -0.01em; text-wrap: balance; }
.jr-card-excerpt { display: -webkit-box; margin: 0 0 18px; font-size: 15.5px; line-height: 1.6; color: #5c5142; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jr-card-meta { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid #efe2d0; font-size: 13.5px; color: #7a6e5d; }
.jr-card-read, .jr-card-more { color: var(--ab-brown); font-weight: 700; }
.jr-card-more { transition: letter-spacing 0.4s var(--xp-ease); }
.blog-card:hover .jr-card-more { letter-spacing: 0.02em; }

/* Featured first card (desktop): spans two columns and two rows */
@media (min-width: 1024px) {
  #posts-grid > .blog-card:first-child { grid-column: span 2; grid-row: span 2; }
  #posts-grid > .blog-card:first-child .jr-card-img { aspect-ratio: auto; flex: 1; min-height: 340px; }
  #posts-grid > .blog-card:first-child .blog-card-body { flex: 0 0 auto; padding: 28px 32px 30px; }
  #posts-grid > .blog-card:first-child .jr-card-title { font-size: clamp(28px, 2.6vw, 36px); line-height: 1.15; }
  #posts-grid > .blog-card:first-child .jr-card-excerpt { font-size: 17px; -webkit-line-clamp: 3; }
}

.jr-empty { display: none; padding: 70px 20px; text-align: center; border-radius: 22px; background: #fffdf9; border: 1px dashed #e2d3bb; }
.jr-empty-title { margin: 0 0 8px; font: 600 28px/1.2 "Playfair Display", serif; color: var(--ab-ink); }
.jr-empty p:not(.jr-empty-title) { margin: 0; font-size: 16px; color: #6b5f4d; }

.jr-close { padding-bottom: clamp(70px, 9vw, 110px); text-align: center; }
.jr-ornament { display: flex; align-items: center; gap: 16px; max-width: 420px; margin: 0 auto 14px; color: var(--ab-gold); }
.jr-ornament::before, .jr-ornament::after { content: ""; flex: 1; height: 1px; background: #e2d3bb; }
.jr-close p { margin: 0; font-size: 15px; color: #6b5f4d; }

/* ---------- Article view ---------- */

.jr-article .xp-article-head .cat-badge { align-self: center; margin-bottom: 16px; }
.jr-article .xp-article-head .cat-badge::after { content: ""; width: 26px; height: 1px; background: currentColor; opacity: 0.7; }
.jr-article .xp-article-head .xp-display { font-size: clamp(34px, 5vw, 60px); }
.jr-back-row { margin: 0 0 26px; }
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid #e2d3bb;
  background: #fffdf9;
  color: var(--ab-brown);
  font: 700 14px/1 "Plus Jakarta Sans", sans-serif;
  cursor: pointer;
  transition: border-color 0.25s, transform 0.4s var(--xp-ease);
}
.back-btn:hover { border-color: var(--ab-gold); transform: translateX(-3px); color: var(--ab-brown); }
.jr-article .xp-article-hero:has(img[src=""]) { display: none; }
.article-content.xp-article-body > p { margin: 0 0 22px; font-size: inherit; line-height: inherit; color: inherit; }
.article-content h3 { margin: 46px 0 14px; font: 600 clamp(25px, 2.5vw, 31px)/1.2 "Playfair Display", serif; color: var(--ab-ink); letter-spacing: -0.015em; }
.article-content strong { color: var(--ab-ink); }
.article-content em { color: inherit; }
.jr-cta-h { margin: 0 0 8px; font: 600 30px/1.2 "Playfair Display", serif; color: #fff; }
.jr-article .xp-article-cta .xp-btn-ghost { cursor: pointer; }

/* ---------- Responsive ---------- */

@media (max-width: 1023px) { #posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 639px) {
  #posts-grid { grid-template-columns: 1fr !important; gap: 20px; }
  .jr-tools { position: static; }
  .jr-search { max-width: none; flex-basis: 100%; }
  .jr-pills { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--xp-gutter) * -1); padding: 2px var(--xp-gutter); scrollbar-width: none; }
  .jr-pills::-webkit-scrollbar { display: none; }
  .cat-pill { flex-shrink: 0; }
  .jr-count { margin-left: 0; }
  .jr-close { padding-bottom: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  .blog-card { animation: none; }
  .blog-card, .blog-card-img, .cat-pill, .back-btn { transition: none; }
}
.cat-badge.Heritage { color: #8a5a12 !important; }
