@charset "utf-8";
/* ============================================================
   FILE: /sites/mhl/assets/css/blog_listing.css
   Post listings — grid, cards, pager (DEV_PLAN §14 step 4 item 4)
   ------------------------------------------------------------
   The post card everywhere it appears: the posts listing (tiles),
   the homepage (featured + rows), country pages and search (rows).

   2.4.4 (DEV_PLAN_Stage3 §4.1 decision 4, Ben, 12 October 2026):
   ONE CARD — photo, title, excerpt, link, then THE BAR in the posts
   colour (--tone-journal, header_footer_v2.css: the journal header's
   own gradient, so the two change together). Three across on the
   listing. Previous file: "blog_listing - v2 (pre-2.4.4).css".
   Since 2.5.2 the bar reads --tone-journal-bar: the same three stops
   as the header, run left to right from the deep end (see THE BAR).

   Colours route through the custom properties on .blog-listing; the
   homepage re-points them on .home-sections .post-card (home.css).

   2.6.5: the listings' head — the title, the intro, the filter and the
   map beside them (see "The map beside the title" below).
   ============================================================ */

.blog-listing {
  --card-accent:      var(--mhl-blue, #1657aa);        /* title hover, pager hover; was gold (2.4.4) */
  --card-accent-soft: var(--mwd-gold, #C9A96E);        /* the placeholder's second stop (and the pager's current page until 2.4.7.2) */
  --card-placeholder: var(--mhl-blue-dark, #0f3f7d);   /* image-less cards; was the old site's purple #6d559c (2.4.1) */
  --card-text:        #555a60;
  --card-border:      #e3e7f0;                         /* the pager's circles; was beige #ebe8e1 (2.4.4) */
  --card-radius:      14px;                            /* the homepage's radius; was 7px (2.4.4) */
  --card-shadow:      0 6px 22px rgba(22, 40, 80, .07);

  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

.blog-listing__header { margin-bottom: 2rem; }
.blog-listing__title  { margin: 0; }
.blog-listing__header .accent-line { margin: 1rem 0 0; }
.blog-listing__empty  { color: var(--card-text); }

/* The intro line and the filter bar above a listing's grid — the posts and reviews listings
   (2.4.6, DEV_PLAN_Stage3 §4.1 decision 9). One class for both: the reviews listing's
   .review-listing__intro (review_page.css) is unused since. The bar itself is
   filter_bar.css; only its place is set here. */
.blog-listing__intro {
  max-width: 46rem;
  margin: 0 0 1.25rem;
  color: var(--card-text);
}
.blog-listing__filter { margin: 0 0 2rem; }

/* ------------------------------------------------------------
   The map beside the title — the posts and reviews listings
   2.6.5 (DEV_PLAN_Stage3 §4.18, Ben, 26 October 2026: "map beside the title", then his own
   layout on the board — a larger map in a white frame, the filter's quick row beside it).
   The listing draws its own title now (views/blogs-index.php, reviews-index.php): the band above
   holds none, so the band → title gap is .page-title's (header_footer_v2.css) and the title
   lines up with the cards, as it did. .listing-head: the title, the intro and the filter on the
   left, the map card (components/listing_map.php) on the right, its foot level with the filter's.
   From 1200px only — below it the card gives way to a text link under the intro (Ben: phones get
   the link; tablets and small laptops too, where the quick row would wrap beside the card or the
   card would push the grid a screen down). 460px leaves the Spanish quick row ("Todas las
   entradas", three countries, "Filtrar") one line beside it.
   Previous file: "blog_listing - v8 (pre-2.6.5).css".
------------------------------------------------------------ */
.blog-listing--headed { padding-top: 1.9rem; }
@media only screen and (max-width: 768px) {
  .blog-listing--headed { padding-top: 1.15rem; }   /* .page-title's 16px */
}
.listing-head { margin: 0 0 2rem; }
.listing-head .blog-listing__filter { margin: 0; }
.listing-head__map-link { display: none; margin: -.25rem 0 1.25rem; }

@media only screen and (min-width: 1200px) {
  .listing-head--map {
    display: flex;
    align-items: stretch;
    gap: 2.5rem;
  }
  .listing-head--map .listing-head__main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
  }
  /* The filter sits at the foot of the column, level with the card's foot … */
  .listing-head--map .blog-listing__filter { margin-top: auto; }
  /* … but a country listing has no intro: there the title and the filter stay together, in the
     middle of the card's height, rather than a gap opening between them. */
  .listing-head--map.listing-head--short .listing-head__main { justify-content: center; }
  .listing-head--map.listing-head--short .blog-listing__filter { margin-top: 0; }
}
@media only screen and (max-width: 1199px) {
  .listing-head__map-link { display: block; }
}

.listing-map {
  display: block;
  flex: 0 0 460px;
  align-self: flex-start;   /* not centre: when the Filter panel opens, the card stays where it is */
  box-sizing: border-box;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(22, 40, 80, .12);
  color: inherit;
  text-decoration: none;
}
.listing-map:focus-visible { outline: 3px solid var(--journal-mid, #0861c4); outline-offset: 3px; }
@media only screen and (max-width: 1199px) {
  .listing-map { display: none; }
}
.listing-map__frame {
  display: block;
  overflow: hidden;
  border-radius: 10px;
  background: #e4eaf4;   /* the outline's sea, under the drawing while it loads */
}
.listing-map__svg { display: block; width: 100%; height: auto; }
.listing-map__dot {
  stroke: #fff;
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}
.listing-map__dot--post   { fill: var(--journal-mid, #0861c4); }
.listing-map__dot--review { fill: var(--reviews-mid, #14731c); }
.listing-map__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .35rem 1rem;
  padding: .7rem .55rem .3rem;
  font-size: .9rem;
}
.listing-map__key {
  --key: var(--journal-mid, #0861c4);
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: #3f4449;
}
.listing-map__key--review { --key: var(--reviews-mid, #14731c); }
.listing-map__key::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--key);
  box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px var(--key);
}
.listing-map__open {
  color: var(--mhl-blue, #1657aa);
  font-weight: 700;
  white-space: nowrap;
}
.listing-map:hover .listing-map__open { text-decoration: underline; }

/* ------------------------------------------------------------
   Grid — three across, two on a tablet, one on a phone (2.4.4).
   12 per page fills the rows evenly at every width.
------------------------------------------------------------ */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}
@media only screen and (max-width: 1024px) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
}
@media only screen and (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------
   Card
   A flex column: the body takes the slack (flex:1), so every tile's
   bar sits on the bottom edge whatever the excerpt's length.
------------------------------------------------------------ */
.post-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 0;
  border-radius: var(--card-radius, 14px);
  box-shadow: var(--card-shadow, 0 6px 22px rgba(22, 40, 80, .07));
  overflow: hidden;
  transition: box-shadow .25s ease, transform .25s ease;
}
.post-card:hover {
  box-shadow: 0 12px 30px rgba(22, 40, 80, .12);
  transform: translateY(-2px);
}

.post-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: #e6e9f0;   /* shows while the image loads; was beige #f2f1ee (2.4.1) */
  overflow: hidden;
}
.post-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.post-card:hover .post-card__image { transform: scale(1.03); }

/* No image: a block carrying the title (Ben, 14 September 2026). */
.post-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--card-placeholder) 0%, var(--card-accent-soft) 100%);
}
.post-card__placeholder-text {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}

.post-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.35rem 1.5rem 1.25rem;
}

.post-card__title {
  margin: 0 0 .6rem;
  font-size: 1.35rem;
  line-height: 1.3;
}
.post-card__title a       { color: inherit; text-decoration: none; }
.post-card__title a:hover { color: var(--card-accent, #1657aa); }

/* Three lines on a tile, two on a row, all of it on the featured card. */
.post-card__excerpt {
  display: -webkit-box;
  margin: 0 0 1.1rem;
  overflow: hidden;
  color: var(--card-text, #555a60);
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}
/* Pushes the link to the bottom so the links line up across a row of tiles. */
.post-card__action { margin: auto 0 0; }
.post-card__action .btn-txt { font-size: .95rem; }

/* ------------------------------------------------------------
   THE BAR (2.4.4) — Ben's layout:
     country (a link) | date ............ photos · comments · ♥
   Every count is hidden at zero by post_card.php.
   2.5.2 (Ben, 20 October 2026): the logo blue, LEFT TO RIGHT from
   the deep end (--tone-journal-bar, header_footer_v2.css), and ALL
   the text white: white on the lightest stop (#0a74e6) is 4.5:1;
   the light gold (country, ♥) and #d9e2ee would fail there, so they
   went white too. Until 2.5.2 the bar was the navy header gradient,
   with a light-gold country and heart. ⚠ Nothing in the link blue
   in here. Previous file: "blog_listing - v6 (pre-2.5.2).css".
------------------------------------------------------------ */
.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .9rem;
  padding: .6rem 1.1rem;
  background: var(--tone-journal-bar, var(--tone-journal, #0861c4));
  color: #fff;
  font-size: .82rem;
  line-height: 1.4;
}
.post-card__meta a       { color: inherit; text-decoration: none; }
.post-card__meta a:hover { text-decoration: underline; }
.post-card__meta a:focus-visible {
  outline: 2px solid #fff;   /* 2.5.2: was light gold, under 3:1 on the logo blue */
  outline-offset: 2px;
  border-radius: 2px;
}

.post-card__countries {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding-right: .9rem;
  border-right: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  font-weight: 700;
}
.post-card__date {
  color: #fff;
  font-weight: 600;
}
.post-card__stats {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  margin-left: auto;   /* the counts sit on the right; they wrap under on a narrow card */
}
.post-card__stat {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.post-card__icon  { flex: 0 0 auto; width: 15px; height: 15px; }
.post-card__heart { color: #fff; font-size: .95rem; line-height: 1; }   /* 2.5.2: was light gold */

/* 'popup' — the map's popup (2.6.1.2, DEV_PLAN_Stage3 §4.2), as review_card.css's: the tile,
   smaller; it sits in Google's InfoWindow or the phone sheet, so it neither floats nor lifts.
   Its width is the popup's (map.css). Previous file: "blog_listing - v7 (pre-2.6.1.2).css". */
.post-card--popup,
.post-card--popup:hover {
  border-radius: 0;
  box-shadow: none;
  transform: none;
}
.post-card--popup:hover .post-card__image { transform: none; }
.post-card--popup .post-card__media   { aspect-ratio: 16 / 8; }
.post-card--popup .post-card__body    { padding: .9rem 1.1rem 1rem; }
.post-card--popup .post-card__title   { margin: 0 0 .35rem; font-size: 1.12rem; }
.post-card--popup .post-card__excerpt { margin: 0 0 .6rem; font-size: .88rem; line-height: 1.55; }
.post-card--popup .post-card__action .btn-txt { font-size: .9rem; }
.post-card--popup .post-card__meta    { padding: .5rem 1rem; font-size: .78rem; }

@media (prefers-reduced-motion: reduce) {
  .post-card,
  .post-card__image  { transition: none; }
  .post-card:hover,
  .post-card:hover .post-card__image { transform: none; }
}

/* ------------------------------------------------------------
   Pager — circles, as on the live site
------------------------------------------------------------ */
.pager { margin-top: 3rem; }
.pager__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pager__link,
.pager__gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 .5rem;
  border-radius: 999px;
  font-weight: 600;
}
.pager__link {
  border: 1px solid var(--card-border);
  background: #fff;   /* 2.4.5 (Ben, 13 October 2026): white circles on the #f3f5f9 page; was transparent */
  color: var(--card-text);
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
/* 2.4.7.2 (Ben, 14 October 2026: "change the page[r] to match the new filter"): the current
   page is the filter's SELECTED look — white, a gold outline, dark gold text (#976b10, 4.7:1)
   — instead of a gold fill with white text (about 2:1). Hover is blue, as the filter options',
   so a gold outline always means "selected". Was: hover gold border; current gold-filled. */
a.pager__link:hover {
  border-color: var(--card-accent);
  color: var(--card-accent);
}
.pager__link.is-current {
  background: #fff;
  border-color: #c89b3f;
  color: #976b10;
}
.pager__gap { color: var(--card-text); }

/* ------------------------------------------------------------
   Featured and row — components/post_card.php: $card['variant']
------------------------------------------------------------ */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}

/* Featured — the homepage's first post: author line, wide photo, the whole excerpt */
.post-card__author {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.5rem;
}
.post-card__avatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.post-card__author-name { color: #1d2433; font-size: .95rem; font-weight: 700; }

.post-card--featured .post-card__media   { aspect-ratio: 21 / 9; }
.post-card--featured .post-card__body    { padding: 1.25rem 1.5rem 1.35rem; }
.post-card--featured .post-card__title   { font-size: 1.6rem; }
.post-card--featured .post-card__excerpt { display: block; overflow: visible; -webkit-line-clamp: unset; line-clamp: none; }
.post-card--featured .post-card__meta    { padding: .7rem 1.5rem; font-size: .88rem; }

/* The featured card's "like, love or comment" row (2.7.0.05, DEV_PLAN_Stage3 §4.5, Ben, canvas
   board B; post_card.php 'react'): the line and 👍 ❤️ 💬 on one row, centred on it; on phones
   the line above the icons. Backup "_backups/css_blog_listing - (pre-2.7.0.05).css". */
.post-card__react {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  margin: .9rem 0 0;
  padding: .8rem 0 0;
  border-top: 1px solid #e6ebf2;
}
.post-card__react-text {
  flex: 1 1 auto;
  margin: 0;
  color: #2b313b;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}
.post-card__react-links { display: flex; flex: 0 0 auto; gap: .5rem; }
.post-card__react-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f1f5fb;
  font-size: 1.4rem;
  line-height: 1;
  text-decoration: none;
  transition: background-color .15s ease, transform .15s ease;
}
.post-card__react-link:hover,
.post-card__react-link:focus-visible { background: #e3ecf8; transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) {
  .post-card__react-link { transition: none; }
  .post-card__react-link:hover,
  .post-card__react-link:focus-visible { transform: none; }
}
/* Phones: the line above the icons, all smaller (2.7.0.07, Ben: "on a mobile can we make this
   smaller") — 36px circles, the text in the excerpt's size and weight. */
@media only screen and (max-width: 600px) {
  .post-card__react { flex-wrap: wrap; gap: .5rem; margin-top: .7rem; padding-top: .65rem; }
  .post-card__react-text { flex-basis: 100%; font-size: .88rem; font-weight: 500; }
  .post-card__react-links { gap: .4rem; }
  .post-card__react-link { width: 36px; height: 36px; font-size: 1.1rem; }
}

/* Row — photo on the left, text on the right, the bar across the whole card.
   A grid, so the bar spans both columns without a wrapper in the markup. */
.post-card--row {
  display: grid;
  grid-template-columns: 30% minmax(0, 1fr);
}
.post-card--row .post-card__media {
  aspect-ratio: auto;
  min-height: 136px;
}
.post-card--row .post-card__image {
  position: absolute;
  inset: 0;
}
.post-card--row .post-card__body {
  justify-content: center;
  padding: 1rem 1.5rem;
}
.post-card--row .post-card__title   { margin: 0 0 .35rem; font-size: 1.25rem; }
.post-card--row .post-card__excerpt { margin: 0 0 .5rem; font-size: .92rem; line-height: 1.6; -webkit-line-clamp: 2; line-clamp: 2; }
.post-card--row .post-card__action  { margin: 0; }
.post-card--row .post-card__meta    { grid-column: 1 / -1; }

@media only screen and (max-width: 600px) {
  .post-card--featured .post-card__media { aspect-ratio: 16 / 10; }
  .post-card--row { grid-template-columns: 1fr; }
  .post-card--row .post-card__media {
    aspect-ratio: 16 / 10;
    min-height: 0;
  }
}

/* ------------------------------------------------------------
   ⚠ UNUSED SINCE 2.4.4 — post_card.php no longer draws these. Kept
   for Ben to decide (never delete unasked).
     .post-card__count        the photo badge on the image (the count is in the bar)
     .post-card__body .accent-line, the old gold date above the title
     .post-card__kicker       the row's date · country line (now the bar)
     .post-card__link         the row and featured link (now .btn-txt)
     .post-card__bar          the featured card's stats bar (now the bar)
     .post-card__byline, .post-card__author-meta   the featured date · place
------------------------------------------------------------ */
.post-card__count {
  position: absolute;
  top: .75rem;
  right: .75rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .65rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1;
}
.post-card__body .accent-line { margin: .6rem 0 .9rem; }
.post-card__kicker {
  margin: 0 0 .35rem;
  color: var(--card-text);
  font-size: .75rem;
}
.post-card__link {
  color: var(--card-accent);
  font-weight: 600;
  text-decoration: none;
}
.post-card__link:hover { text-decoration: underline; }
.post-card__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  padding: .85rem 1.5rem;
  border-top: 1px solid var(--card-border);
  color: var(--card-text);
  font-size: .85rem;
}
.post-card__byline {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}
.post-card__author-meta { color: var(--card-text); font-size: .8rem; }
